/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.henryschein.mmvvcc.slave;

import javax.servlet.ServletContext;

/**
 *
 * @author Alexx
 */
public final class ServletCont {

    private static volatile ServletCont instance;
    private static ServletContext sc;
    
    private ServletCont(){}

    public static ServletCont getInstance() {
        ServletCont localInstance = instance;
        if (localInstance == null) {
            synchronized (ServletCont.class) {
                localInstance = instance;
                if (localInstance == null) {
                    instance = new ServletCont();
                }
            }
        }
        return localInstance;
    }

    public static ServletContext getSc() {
        return sc;
    }

    public static void setSc(ServletContext sc) {
        ServletCont.sc = sc;
    }
}
